package com.textbasedgame.intro;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import com.textbasedgame.choices.Choice;
import com.textbasedgame.choices.Choice17;
import com.textbasedgame.choices.Choice30;
import com.textbasedgame.people.Player;

public class IntroChoice extends Choice{

	public IntroChoice(Player player) {
		this.player = player;
	}

	public void play(){
		System.out.println ("When awareness returns you look around. You are standing");
		System.out.println ("in a huge vaulted chamber, deep underground. In the chill");
		System.out.println ("air you wonder what terrible fate may be in store for you.");
		System.out.println ("You are utterly alone, without a friend in the world, and");
		System.out.println ("you have no idea what fiendish horrors may exist here, so far from home.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("There are no windows in the chambers, nor natural");
		System.out.println ("light, only the ruddy glow of flaming torches that are fixed to");
		System.out.println ("pillars soaring beyond sight. The walls are running with damp,");
		System.out.println ("the air musty and heavy with age. There are two archways at the");
		System.out.println ("back of the cavern. Before you can investigate further, the");
		System.out.println ("torchlight flickers, and a cool gust chills you to the marrow;");
		System.out.println ("somthing in the inseen darkness is causing the air to move.");
		System.out.print(TERM_ARROW);
				
		try {
			enter = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}

		System.out.println ("A light flashes briefly ahead and an infernal howling echoes across the vast");
		System.out.println ("vault. No living thing could possibly have made that dreadful sound,");
		System.out.println ("you think to yourself, but then you remember that you know nothing of");
		System.out.println ("the dreadful denizens of Orb. You hear the sound of running footsteps");
		System.out.println ("approaching rapidly; you cannot yet see who or what is comming.");
		System.out.println ("1.Will you run through the nearest archway?"); //page 17
		System.out.println ("2.Or hold your ground and draw your sword?"); //page 30
		System.out.print(TERM_ARROW);
			
		String choice = null;
		
		try {
			choice = br.readLine();
		} catch (IOException ioe) {
			System.out.println("IO error trying to read your name!");
		}
		
		if (choice.equals("1")){
			Choice17 choice17 = new Choice17(player);
			choice17.start();
		}else{
			if (choice.equals("2")){
				Choice30 choice30 = new Choice30(player);
				choice30.start();
			}
		}
		
		
		
	}
}
